home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / CMAcceleration.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  3.8 KB  |  120 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMAcceleration.p
  3.  
  4.      Contains:    ColorSync Acceleration Component API
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT CMAcceleration;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CMACCELERATION__}
  27. {$SETC __CMACCELERATION__ := 1}
  28.  
  29. {$I+}
  30. {$SETC CMAccelerationIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __COMPONENTS__}
  34. {$I Components.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __CMAPPLICATION__}
  37. {$I CMApplication.p}
  38. {$ENDC}
  39.  
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. {  –––––––––––––––––––––––––––––––––––––– version info  }
  46.  
  47. CONST
  48.     cmAccelerationInterfaceVersion = 1;
  49.  
  50. {  –––––––––––––––––––––––––––––––––––––– Component Type  }
  51.     cmAccelerationComponentType    = 'csac';
  52.  
  53. {  –––––––––––––––––––––––––––––––––––––– Required Component function selectors  }
  54.     cmLoadTables                = 0;
  55.     cmCalculateData                = 1;
  56.  
  57. {  –––––––––––––––––––––––––––––––––––––– table data for acceleration component  }
  58.  
  59. TYPE
  60.     CMAccelerationTableDataPtr = ^CMAccelerationTableData;
  61.     CMAccelerationTableData = RECORD
  62.         inputLutEntryCount:        LONGINT;                                {  count of entries for input lut for one dimension }
  63.         inputLutWordSize:        LONGINT;                                {  count of bits of each entry ( e.g. 16 for WORD ) }
  64.         inputLut:                Handle;                                    {  handle to input lut }
  65.         outputLutEntryCount:    LONGINT;                                {  count of entries for output lut for one dimension     }
  66.         outputLutWordSize:        LONGINT;                                {  count of bits of each entry ( e.g. 8 for BYTE ) }
  67.         outputLut:                Handle;                                    {  handle to output lut }
  68.         colorLutInDim:            LONGINT;                                {  input dimension  ( e.g. 3 for LAB ; 4 for CMYK ) }
  69.         colorLutOutDim:            LONGINT;                                {  output dimension ( e.g. 3 for LAB ; 4 for CMYK ) }
  70.         colorLutGridPoints:        LONGINT;                                {  count of gridpoints for color lut ( for one Dimension )     }
  71.         colorLutWordSize:        LONGINT;                                {  count of bits of each entry ( e.g. 8 for BYTE ) }
  72.         colorLut:                Handle;                                    {  handle to color lut }
  73.         inputColorSpace:        CMBitmapColorSpace;                        {  packing info for input }
  74.         outputColorSpace:        CMBitmapColorSpace;                        {  packing info for output }
  75.         userData:                Ptr;
  76.         reserved1:                UInt32;
  77.         reserved2:                UInt32;
  78.         reserved3:                UInt32;
  79.         reserved4:                UInt32;
  80.         reserved5:                UInt32;
  81.     END;
  82.  
  83.     CMAccelerationTableDataHdl            = ^CMAccelerationTableDataPtr;
  84. {  –––––––––––––––––––––––––––––––––––––– calc data for acceleration component  }
  85.     CMAccelerationCalcDataPtr = ^CMAccelerationCalcData;
  86.     CMAccelerationCalcData = RECORD
  87.         pixelCount:                LONGINT;                                {  count of input pixels }
  88.         inputData:                Ptr;                                    {  input array }
  89.         outputData:                Ptr;                                    {  output array }
  90.         reserved1:                UInt32;
  91.         reserved2:                UInt32;
  92.     END;
  93.  
  94.     CMAccelerationCalcDataHdl            = ^CMAccelerationCalcDataPtr;
  95. {
  96.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  97.                   A c c e l e r a t i o n   C o m p o n e n t   I n t e r f a c e s
  98.    ———————————————————————————————————————————————————————————————————————————————————————————————— 
  99. }
  100. FUNCTION CMAccelerationLoadTables(CMSession: ComponentInstance; tableData: CMAccelerationTableDataPtr): CMError;
  101.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  102.     INLINE $2F3C, $0004, $0000, $7000, $A82A;
  103.     {$ENDC}
  104.  
  105. FUNCTION CMAccelerationCalculateData(CMSession: ComponentInstance; calcData: CMAccelerationCalcDataPtr): CMError;
  106.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  107.     INLINE $2F3C, $0004, $0001, $7000, $A82A;
  108.     {$ENDC}
  109.  
  110. {$ALIGN RESET}
  111. {$POP}
  112.  
  113. {$SETC UsingIncludes := CMAccelerationIncludes}
  114.  
  115. {$ENDC} {__CMACCELERATION__}
  116.  
  117. {$IFC NOT UsingIncludes}
  118.  END.
  119. {$ENDC}
  120.